import scrapy
from scrapy.loader.processors import TakeFirst, Join, MapCompose
from w3lib.html import remove_tags


class Movie(scrapy.Item):
    title = scrapy.Field(input_processor=MapCompose(remove_tags), output_processor=TakeFirst())
    code = scrapy.Field(output_processor=TakeFirst())
    temp_img = scrapy.Field(output_processor=TakeFirst())
    url = scrapy.Field(output_processor=TakeFirst())
    types = scrapy.Field(output_processor=Join(','))
    pubdate = scrapy.Field(output_processor=TakeFirst(), serializer=str)
